package com.igen.rxnetaction.wifi;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by hp on 2017/3/21.
 */

public class WiFiState implements Parcelable {
    private int nowState;
    private int preState;

    public WiFiState(int nowState, int preState) {
        this.nowState = nowState;
        this.preState = preState;
    }

    public int getPreState() {

        return preState;
    }

    public void setPreState(int preState) {
        this.preState = preState;
    }

    public int getNowState() {
        return nowState;
    }

    public void setNowState(int nowState) {
        this.nowState = nowState;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.nowState);
        dest.writeInt(this.preState);
    }

    protected WiFiState(Parcel in) {
        this.nowState = in.readInt();
        this.preState = in.readInt();
    }

    public static final Parcelable.Creator<WiFiState> CREATOR = new Parcelable.Creator<WiFiState>() {
        @Override
        public WiFiState createFromParcel(Parcel source) {
            return new WiFiState(source);
        }

        @Override
        public WiFiState[] newArray(int size) {
            return new WiFiState[size];
        }
    };
}
